package com.burnerpat.fl2d.core.weapon;

public class Ammunition
{
	private String name = "undefined";
	
	private double damageModifier = 0.5f;
	private double speedModifier = 0.5f;
	
	public Ammunition()
	{
		
	}
	
	public Ammunition(String pName)
	{
		name = pName;
	}
	
	public Ammunition(String pName, double pDamageModifier, double pSpeedModifier)
	{
		name = pName;
		damageModifier = pDamageModifier;
		speedModifier = pSpeedModifier;
	}
	
	public void setWeightedAttributes(double damageWeight, double speedWeight)
	{
		damageModifier = damageWeight / (damageWeight + speedWeight);
		
		speedModifier = 1.0 - damageModifier;
	}
	
	public String getName()
	{
		return name;
	}

	public double getDamageModifier()
	{
		return damageModifier;
	}
	
	public double getSpeedModifier()
	{
		return speedModifier;
	}
}
